import basicLayout from "../layout/basic-layout.vue"

const login = () => import("../views/login/index.vue")
const home = () => import("../views/home/index.vue")
const student = () => import("../views/user/student/index.vue")
const teacher = () => import("../views/user/teacher/index.vue")
const addteacher = () => import("../views/user/teacher/addteacher/index.vue")

const category = () => import("../views/category/index.vue")
const addcategory = () => import("../views/category/addcategory/index.vue")

const course = () => import("../views/course/index.vue")
const addcourse = () => import("../views/course/add/index.vue")
const coursemenu = () => import("../views/course/menu/index.vue")
const order = () => import("../views/order/index.vue")
const document = () => import("../views/document/index.vue")
const money = () => import("../views/money/index.vue")

export default [
    // 登录页
    {
        path: "/login",
        component: login,
        meta: {
            title: "登录"
        }
    },
    // 首页
    {
        path: "/home",
        meta: {
            title: "系统主页"
        },
        component: basicLayout,
        children: [
            {
                name: "homeLindex",
                path: "index",
                component: home,
            }
        ]
    },
    // 用户管理
    {
        path: "/user",
        component: basicLayout,
        meta: {
            title: "用户管理"
        },
        children: [
            {
                path: "student",
                component: student,
                meta: {
                    title: "学生管理"
                }
            },
            {
                path: "teacher",
                component: teacher,
                meta: {
                    title: "教师管理"
                }
            },
            {
                path: "teacheraddteacher",
                component: addteacher,
                meta: {
                    title: "添加教师"
                }
            }
        ]
    }
    ,
    // 分类管理
    {
        path: "/category",
        component: basicLayout,
        meta: {
            title: "分类管理"
        },
        children: [
            {
                path: "index",
                component: category,
            },
            {
                path: "addcategory",
                component: addcategory,
                meta: {
                    title: "添加分类"
                }
            }
        ]
    },
    // 课程管理
    {
        path: "/course",
        component: basicLayout,
        meta: {
            title: "课程管理"
        },
        children: [
            {
                path: "index",
                component: course,
            },
            {
                path: "addcourse",
                component: addcourse,
                meta: {
                    title: "添加课程"
                }
            },
            // 课程
            {
                path: "coursemenu",
                component: coursemenu,
                meta: {
                    title: "课程目录"
                }
            },
        ]
    },
    // 订单管理
    {
        path: "/order",
        component: basicLayout,
        meta: {
            title: "订单管理"
        },
        children: [
            {
                path: "index",
                component: order,
            }
        ]

    },
    // 文档管理
    {
        path: "/document",
        component: basicLayout,
        meta: {
            title: "文档管理"
        },
        children: [
            {
                path: "index",
                component: document,
            }
        ]

    },
    // 收入管理
    {
        path: "/money",
        component: basicLayout,
        meta: {
            title: "收入管理"
        },
        children: [
            {
                path: "index",
                component: money,
            }
        ]

    },
    // 重定向
    {
        path: "/",
        redirect: {
            name: "homeLindex",
        },
    },
]
